package shapewar.view.myview;

import shapewar.engine.presenter.Presenter;
import android.os.Bundle;
import android.os.Handler;
import android.widget.FrameLayout;

public class MyFrameLayout {
	public static MyView views_add[] = new MyView[100];
	public static MyView views_remove[] = new MyView[100];
	public static int i_add = 0,j_add = 0;
	public static int i_remove = 0,j_remove = 0;
	
	private FrameLayout frame;
	private Presenter pst;
	
	public MyFrameLayout(FrameLayout frame, Presenter pst) {
		this.frame = frame;
		this.pst = pst;
		pst.ect.frame = this;
	}

	public void addView(MyView child) {
//		views_add[i_add++%views_add.length] = child;
//		valid();
		frame.addView(child);
	}
	
	public void removeView(MyView view) {
//		views_remove[i_remove++%views_remove.length] = view;
//		valid();
		frame.removeView(view);
	}
	
	public void valid() {
//		while(j_add<i_add)
//			frame.addView(views_add[j_add++%views_add.length]);
//		while(j_remove<i_remove)
//			frame.removeView(views_remove[j_remove++%views_remove.length]);
	}
}
